Bought son a used car. Then this happened

2002 Ford explorer sport Trac 120k miles 4.0 sohc v6

Everything seemed fine but took to a mechanic just to double check everything was okay and then this happened. Took the valve cover off and TONS of sludge.

Do I have any decent options to try before throwing in the towel? Should I try mystery oil and oil/filter changes and see if I can get this any better or take the loss now?

2002 Ford explorer sport Trac 120k miles 4.0 sohc v6

Everything seemed fine but took to a mechanic just to double check everything was okay and then this happened. Took the valve cover off and TONS of sludge.

Do I have any decent options to try before throwing in the towel? Should I try mystery oil and oil/filter changes and see if I can get this any better or take the loss now?